#include <ros/ros.h>
#include "srv_demo/CallAdd.h"
#include <string>
bool handle_function(srv_demo::CallAdd::Request &req,
                     srv_demo::CallAdd::Response &res){
  res.z = req.x+req.y;
  return true;
}

int main(int argc, char **argv)
{
  ros::init(argc, argv, "server");
  ros::NodeHandle nh;
  ros::ServiceServer service = nh.advertiseService("calladd", handle_function);
  ros::spin();
  return 0;
}
